﻿using FreeSql.DataAnnotations;
using Jumei.Common.BaseModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jumei.Model.Business.GoodsManage
{
    /// <summary>
    /// 商品规格表
    /// </summary>
    [Table(Name = "gd_goods_specs")]
    public class GoodsSpecsEntity : EntityFull, ITenant
    {
        /// <summary>
        /// 租户Id
        /// </summary>
        [Column(Position = -10)]
        public long? TenantId { get; set; }

        /// <summary>
        /// 店铺ID
        /// </summary>
        public long ShopId { get; set; }

        /// <summary>
        /// 商品ID
        /// </summary>
        public long GoodsId { get; set; }

        public GoodsEntity Goods { get; set; }

        /// <summary>
        /// 商品货号
        /// </summary>
        [Column(StringLength = 20)]
        public string ProductNo { get; set; }

        /// <summary>
        /// 规格ID格式
        /// 例如：specId:specId:specId:specId:specId
        /// </summary>
        [Column(StringLength = 20)]
        public string SpecIds { get; set; }

        /// <summary>
        /// 市场价
        /// </summary>
        public decimal MarketPrice { get; set; }

        /// <summary>
        /// 商品价
        /// </summary>
        public decimal SpecPrice { get; set; }

        /// <summary>
        /// 库存
        /// </summary>
        public int SpecStock { get; set; }

        /// <summary>
        /// 预警值
        /// </summary>
        public int WarnStock { get; set; }

        /// <summary>
        /// 销量
        /// </summary>
        public int SaleNum { get; set; }

        /// <summary>
        /// 默认规格
        /// 1：默认规格 
        /// 0：非默认规格
        /// </summary>
        public int IsDefault { get; set; }

        /// <summary>
        /// 商品重量
        /// </summary>
        public decimal SpecWeight { get; set; }

        /// <summary>
        /// 商品体积
        /// </summary>
        public decimal SpecVolume { get; set; }
    }
}
